<?php
namespace Manage\Controller;

use Think\Controller;

class ClientController extends CommonController{
    public function index(){
        $type = '客户来电';
        $phoneInfo = M('phone')->order('public_time desc')->select();

        $this->assign('type',$type);
        $this->assign('phoneInfo',$phoneInfo);
        $this->display();
    }

    public function del(){
        $ids = I('key');
        if(empty($ids)){
            $ids = I('get.id');
        }
        $where = array('id' => array('in', $ids));
        if(M('phone')->where($where)->delete()){
            $this->success('删除成功', U('Client/index'));
        }else{
            $this->error('删除失败');
        }
    }
}
?>
